<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for遍历对象</title>
</head>
<script src="../js/vue.js"></script>
<body>

<div id="app">
    <ul>
        遍历对象的时候获取value值
        <li v-for="item in info">{{item}}</li>

        遍历对象获取key和value值
        <li v-for="(item,key) in info">{{key}} : {{item}}</li>

        遍历对象获取index，key，value值
        <li v-for="(item,key,index) in info">{{index}} - {{key}} : {{item}}</li>
    </ul>
</div>

</body>

<script>
    const vue = new Vue({
        'el': '#app',
        'data': {
            info: {
                name: '周杰伦',
                age: 32,
                height: 1.78
            }
        },
        'methods': {}
    })
</script>
</html>